.\" Man page generated from reStructuredText.
.
.TH "RADOSGW" "8" "March 07, 2017" "dev" "Ceph"
.SH NAME
radosgw \- rados REST gateway
.
.nr rst2man-indent-level 0
.
.de1 rstReportMargin
\\$1 \\n[an-margin]
level \\n[rst2man-indent-level]
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
-
\\n[rst2man-indent0]
\\n[rst2man-indent1]
\\n[rst2man-indent2]
..
.de1 INDENT
.\" .rstReportMargin pre:
. RS \\$1
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
. nr rst2man-indent-level +1
.\" .rstReportMargin post:
..
.de UNINDENT
. RE
.\" indent \\n[an-margin]
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
.nr rst2man-indent-level -1
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
.SH SYNOPSIS
.nf
\fBradosgw\fP
.fi
.sp
.SH DESCRIPTION
.sp
\fBradosgw\fP is an HTTP REST gateway for the RADOS object store, a part
of the Ceph distributed storage system. It is implemented as a FastCGI
module using libfcgi, and can be used in conjunction with any FastCGI
capable web server.
.SH OPTIONS
.INDENT 0.0
.TP
.B \-c ceph.conf, \-\-conf=ceph.conf
Use \fBceph.conf\fP configuration file instead of the default
\fB/etc/ceph/ceph.conf\fP to determine monitor addresses during startup.
.UNINDENT
.INDENT 0.0
.TP
.B \-m monaddress[:port]
Connect to specified monitor (instead of looking through \fBceph.conf\fP).
.UNINDENT
.INDENT 0.0
.TP
.B \-i ID, \-\-id ID
Set the ID portion of name for radosgw
.UNINDENT
.INDENT 0.0
.TP
.B \-n TYPE.ID, \-\-name TYPE.ID
Set the rados user name for the gateway (eg. client.radosgw.gateway)
.UNINDENT
.INDENT 0.0
.TP
.B \-\-cluster NAME
Set the cluster name (default: ceph)
.UNINDENT
.INDENT 0.0
.TP
.B \-d
Run in foreground, log to stderr
.UNINDENT
.INDENT 0.0
.TP
.B \-f
Run in foreground, log to usual location
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rgw\-socket\-path=path
Specify a unix domain socket path.
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rgw\-region=region
The region where radosgw runs
.UNINDENT
.INDENT 0.0
.TP
.B \-\-rgw\-zone=zone
The zone where radosgw runs
.UNINDENT
.SH CONFIGURATION
.sp
Earlier RADOS Gateway had to be configured with \fBApache\fP and \fBmod_fastcgi\fP\&.
Now, \fBmod_proxy_fcgi\fP module is used instead of \fBmod_fastcgi\fP\&.
\fBmod_proxy_fcgi\fP works differently than a traditional FastCGI module. This
module requires the service of \fBmod_proxy\fP which provides support for the
FastCGI protocol. So, to be able to handle FastCGI protocol, both \fBmod_proxy\fP
and \fBmod_proxy_fcgi\fP have to be present in the server. Unlike \fBmod_fastcgi\fP,
\fBmod_proxy_fcgi\fP cannot start the application process. Some platforms have
\fBfcgistarter\fP for that purpose. However, external launching of application
or process management may be available in the FastCGI application framework
in use.
.sp
\fBApache\fP can be configured in a way that enables \fBmod_proxy_fcgi\fP to be used
with localhost tcp or through unix domain socket. \fBmod_proxy_fcgi\fP that doesn\(aqt
support unix domain socket such as the ones in Apache 2.2 and earlier versions of
Apache 2.4, needs to be configured for use with localhost tcp. Later versions of
Apache like Apache 2.4.9 or later support unix domain socket and as such they
allow for the configuration with unix domain socket instead of localhost tcp.
.sp
The following steps show the configuration in Ceph\(aqs configuration file i.e,
\fB/etc/ceph/ceph.conf\fP and the gateway configuration file i.e,
\fB/etc/httpd/conf.d/rgw.conf\fP (RPM\-based distros) or
\fB/etc/apache2/conf\-available/rgw.conf\fP (Debian\-based distros) with localhost
tcp and through unix domain socket:
.INDENT 0.0
.IP 1. 3
For distros with Apache 2.2 and early versions of Apache 2.4 that use
localhost TCP and do not support Unix Domain Socket, append the following
contents to \fB/etc/ceph/ceph.conf\fP:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
[client.radosgw.gateway]
host = {hostname}
keyring = /etc/ceph/ceph.client.radosgw.keyring
rgw socket path = ""
log file = /var/log/ceph/client.radosgw.gateway.log
rgw frontends = fastcgi socket_port=9000 socket_host=0.0.0.0
rgw print continue = false
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 2. 3
Add the following content in the gateway configuration file:
.sp
For Debian/Ubuntu add in \fB/etc/apache2/conf\-available/rgw.conf\fP:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/html

ErrorLog /var/log/apache2/rgw_error.log
CustomLog /var/log/apache2/rgw_access.log combined

# LogLevel debug

RewriteEngine On

RewriteRule .* \- [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

SetEnv proxy\-nokeepalive 1

ProxyPass / fcgi://localhost:9000/

</VirtualHost>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
For CentOS/RHEL add in \fB/etc/httpd/conf.d/rgw.conf\fP:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/html

ErrorLog /var/log/httpd/rgw_error.log
CustomLog /var/log/httpd/rgw_access.log combined

# LogLevel debug

RewriteEngine On

RewriteRule .* \- [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

SetEnv proxy\-nokeepalive 1

ProxyPass / fcgi://localhost:9000/

</VirtualHost>
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 3. 3
For distros with Apache 2.4.9 or later that support Unix Domain Socket,
append the following configuration to \fB/etc/ceph/ceph.conf\fP:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
[client.radosgw.gateway]
host = {hostname}
keyring = /etc/ceph/ceph.client.radosgw.keyring
rgw socket path = /var/run/ceph/ceph.radosgw.gateway.fastcgi.sock
log file = /var/log/ceph/client.radosgw.gateway.log
rgw print continue = false
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 4. 3
Add the following content in the gateway configuration file:
.sp
For CentOS/RHEL add in \fB/etc/httpd/conf.d/rgw.conf\fP:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/html

ErrorLog /var/log/httpd/rgw_error.log
CustomLog /var/log/httpd/rgw_access.log combined

# LogLevel debug

RewriteEngine On

RewriteRule .* \- [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

SetEnv proxy\-nokeepalive 1

ProxyPass / unix:///var/run/ceph/ceph.radosgw.gateway.fastcgi.sock|fcgi://localhost:9000/

</VirtualHost>
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The latest version of Ubuntu i.e, 14.04 ships with \fBApache 2.4.7\fP that
does not have Unix Domain Socket support in it and as such it has to be
configured with localhost tcp. The Unix Domain Socket support is available in
\fBApache 2.4.9\fP and later versions. A bug has been filed to backport the UDS
support to \fBApache 2.4.7\fP for \fBUbuntu 14.04\fP\&.
See: \fI\%https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1411030\fP
.IP 5. 3
Generate a key for radosgw to use for authentication with the cluster.
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
ceph\-authtool \-C \-n client.radosgw.gateway \-\-gen\-key /etc/ceph/keyring.radosgw.gateway
ceph\-authtool \-n client.radosgw.gateway \-\-cap mon \(aqallow rw\(aq \-\-cap osd \(aqallow rwx\(aq /etc/ceph/keyring.radosgw.gateway
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 6. 3
Add the key to the auth entries.
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
ceph auth add client.radosgw.gateway \-\-in\-file=keyring.radosgw.gateway
.ft P
.fi
.UNINDENT
.UNINDENT
.IP 7. 3
Start Apache and radosgw.
.sp
Debian/Ubuntu:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
sudo /etc/init.d/apache2 start
sudo /etc/init.d/radosgw start
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
CentOS/RHEL:
.INDENT 3.0
.INDENT 3.5
.sp
.nf
.ft C
sudo apachectl start
sudo /etc/init.d/ceph\-radosgw start
.ft P
.fi
.UNINDENT
.UNINDENT
.UNINDENT
.SH USAGE LOGGING
.sp
\fBradosgw\fP maintains an asynchronous usage log. It accumulates
statistics about user operations and flushes it periodically. The
logs can be accessed and managed through \fBradosgw\-admin\fP\&.
.sp
The information that is being logged contains total data transfer,
total operations, and total successful operations. The data is being
accounted in an hourly resolution under the bucket owner, unless the
operation was done on the service (e.g., when listing a bucket) in
which case it is accounted under the operating user.
.sp
Following is an example configuration:
.INDENT 0.0
.INDENT 3.5
.sp
.nf
.ft C
[client.radosgw.gateway]
    rgw enable usage log = true
    rgw usage log tick interval = 30
    rgw usage log flush threshold = 1024
    rgw usage max shards = 32
    rgw usage max user shards = 1
.ft P
.fi
.UNINDENT
.UNINDENT
.sp
The total number of shards determines how many total objects hold the
usage log information. The per\-user number of shards specify how many
objects hold usage information for a single user. The tick interval
configures the number of seconds between log flushes, and the flush
threshold specify how many entries can be kept before resorting to
synchronous flush.
.SH AVAILABILITY
.sp
\fBradosgw\fP is part of Ceph, a massively scalable, open\-source, distributed
storage system. Please refer to the Ceph documentation at \fI\%http://ceph.com/docs\fP for
more information.
.SH SEE ALSO
.sp
\fBceph\fP(8)
\fBradosgw\-admin\fP(8)
.SH COPYRIGHT
2010-2014, Inktank Storage, Inc. and contributors. Licensed under Creative Commons BY-SA
.\" Generated by docutils manpage writer.
.
